package mars.ns.core

/**
 * Trait HasNodes, for all classes that also have nodes, with some basic functionality
 */
trait HasNodes {
    def getNodes : List[Node]
    
    /**
     * @return	True if this network contains the given node
     */
    def hasNode(node: Node) : Boolean = {
        node != null && (this.getNodes exists (i => i.canEqual(node)))
    }
}